import { createRouter, createWebHashHistory } from 'vue-router'

import TreasureView from "@/views/TreasureView";
import RecordView from "@/views/RecordView";
import ProfileCardView from "@/views/card/ProfileCardView";
import PracticalTableView from "@/views/useless/PracticalTableView";
import userCardVIew from "@/views/card/UserCardVIew";
import CatButterflyView from "@/views/beautiful/CatButterflyView";
import DogRoseView from "@/views/beautiful/DogRoseView";
import NewsCardView from "@/views/card/NewsCardView";
import GreenEyesCatView from "@/views/beautiful/GreenEyesCatView";
import TictactoeView from "@/views/games/TictactoeView";
import TwoFiveFilm from "@/views/games/TwoFiveFilm";
import DisOneView from "@/views/disccuss/DisOneView";
import DisThreeView from "@/views/disccuss/DisThreeView";
import InfoMation from "@/views/info/InfoMation";
import CompanyInfo from "@/views/info/CompanyInfo";
import ArrangeMent from "@/views/arrange/ArrangeMent";
import AreaTicket from "@/views/beautiful/AreaTicket";
import TheaterTicket from "@/views/beautiful/TheaterTicket";

const routes = [
  {
    path: '/',
    name:'index',
    redirect:'/treasure',
  },

  //  正在热映
  {
    path: '/treasure',
    name: 'treasure',
    component: TreasureView
  },
  // 即将上映
  {
    path:'/record',
    name:'record',
    component: RecordView
  },

  //  数据大盘
  {
    path:'/card',
    name: 'card',
    children: [
      {
        path: 'userCard',
        name: 'userCard',
        component: userCardVIew,
      },
      {
        path: 'profileCard',
        name: 'profileCard',
        component: ProfileCardView,
      },
      {
        path: 'newsCard',
        name: 'newsCard',
        component: NewsCardView
      }
    ]
  },


  //  票房分析
  {
    path: '/beautiful',
    name: 'beautiful',
    children: [
      {
        path: 'catButterfly',
        name: 'catButterfly',
        component: CatButterflyView
      },
      {
        path: 'dogRose',
        name: 'dogRose',
        component: DogRoseView
      },
      {
        path: 'greenEyesCat',
        name: 'greenEyesCat',
        component: GreenEyesCatView
      },
      {
        path: 'areaTicket',
        name: 'areaTicket',
        component: AreaTicket
      },
      {
        path: 'theaterTicket',
        name: 'theaterTicket',
        component: TheaterTicket
      },
    ]
  },
    //宣发舆情
    {
      path: '/disccuss',
      name: 'disccuss',
      children: [
        {
          path: 'disOneView',
          name: 'disOneView',
          component: DisOneView
        },
        {
          path: 'disThreeView',
          name: 'disThreeView',
          component: DisThreeView
        }
      ]
    },



  //  没用上
  {
    path: '/games',
    name: 'games',
    children: [
      {
        path: 'tictactoe',
        name: 'tictactoe',
      component: TictactoeView
      },
      {
        path: 'twofivefilm',
        name: 'twofivefilm',
      component: TwoFiveFilm
      }
    ]
  },
    //影片排片
    {
      path: '/arrange',
      name: 'arrange',
      children: [
        {
          path: 'arrangement',
          name: 'arrangement',
        component: ArrangeMent
        }
      ]
    },
  //  情报
  {
    path: '/info',
    name: 'info',
    children: [
      {
        path: 'infomation',
        name: 'infomation',
      component: InfoMation
      },
      {
        path: 'companyinfo',
        name: 'companyinfo',
      component: CompanyInfo
      }
    ]
  },


  {
    path: '/practicalTable',
    name: 'practicalTable',
    component: PracticalTableView,
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
